﻿// -----------------------------------------------------------------------
// <copyright file="IPushStatsService.cs" company="Zen Design Corp">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace Zen.BlackBerry.Push.Stats
{
	using System;
	using System.Collections.Generic;
	using System.Linq;
	using System.Text;

	/// <summary>
	/// Business service methods relating to managing push statistics.
	/// </summary>
	public interface IPushStatsService
	{
		/// <summary>
		/// Gets the remaining quota (in number of pushes) for the specified
		/// push application.
		/// </summary>
		/// <param name="applicationId">The application id.</param>
		/// <param name="preferUseCache">if set to <c>true</c> [prefer use cache].</param>
		/// <returns></returns>
		long GetRemainingQuota(string applicationId, bool preferUseCache);

		/// <summary>
		/// Gets the total bytes of content pushed to the specified push
		/// application.
		/// </summary>
		/// <param name="applicationId">The application id.</param>
		/// <returns></returns>
		long GetRunningContentSum(string applicationId);

		/// <summary>
		/// Gets a running count of pushes for the specified push application.
		/// </summary>
		/// <param name="applicationId">The application id.</param>
		/// <returns></returns>
		long GetRunningPushCount(string applicationId);

		/// <summary>
		/// Increments the push statistics for a push application by the given
		/// push count and total content sum.
		/// </summary>
		/// <param name="applicationId">The application id.</param>
		/// <param name="pushCount">The push count.</param>
		/// <param name="contentSum">The content sum.</param>
		void IncrementPushStats(string applicationId, int pushCount, long contentSum);

		/// <summary>
		/// Resets the running content sum pushed to the specified push
		/// application.
		/// </summary>
		/// <param name="applicationId">The application id.</param>
		void ResetRunningContentSum(string applicationId);

		/// <summary>
		/// Resets the running push count for the specified push application.
		/// </summary>
		/// <param name="applicationId">The application id.</param>
		void ResetRunningPushCount(string applicationId);
	}
}
